<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增会议')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-conference-add">

            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">会议名称：</label>
                    <div class="col-sm-8">
                        <input name="conName" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">会议开始时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="conStartTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">会议结束时间：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="conEndTime" class="form-control" placeholder="yyyy-MM-dd HH:mm:ss" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">会议排序：</label>
                    <div class="col-sm-8">
                        <input name="conSort" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">会议密码：</label>
                    <div class="col-sm-8">
                        <input name="conPassword" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">参会人员：</label>
                    <div class="col-sm-8">
                        <!--<input name="conUserId" class="form-control" type="text">-->
                        <select name="conUserId" class="form-control">
                            <option value="">所有人员</option>
                            <option th:each="user : ${sysUsers}" th:text="${user.userName}" th:value="${user.userId}">
                            </option>
                        </select>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">

        var prefix = ctx + "system/conference"
        $("#form-conference-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-conference-add').serialize());
            }
        }


        $("input[name='conStartTime']").datetimepicker({
            format: 'yyyy-mm-dd hh:ii:ss',
            /* minView: "month",  *///选择日期后，不会再跳转去选择时分秒
            weekstart:1,
            todayBtn:1,
            autoclose:1,
            todayHighlight:1,
            startView:2,
            forceParse:0,
            showMeridian:1
        }).on("changeDate",function(e){
            var time = new Date(e.date.getTime()+(e.date.getTimezoneOffset()* 60000))
            console.log(time);
        });

        $("input[name='conEndTime']").datetimepicker({
            format: "yyyy-mm-dd hh:ii:ss",
            weekstart:1,
            todayBtn:1,
            autoclose:1,
            todayHighlight:1,
            startView:2,
            forceParse:0,
            showMeridian:1
        }).on("changeDate",function(e){
            var time = new Date(e.date.getTime()+(e.date.getTimezoneOffset()* 60000))
            console.log(time);
        });
    </script>
</body>
</html>